---
layout: m1x_soap
title: Catalog Product Attribute Set
---

<h2><a name="MAPI-ProductAttributeSets-Module%3AMageCatalog"></a>Module: Mage_Catalog</h2>

<p>The Mage_Catalog module allows you to manage categories and products.</p>

<h4><a name="MAPI-ProductAttributeSets-ProductAttributeSets"></a>Product Attribute Sets</h4>

<p>Allows you to retrieve product attribute sets.</p>

<p><b>Resource Name</b>: catalog_product_attribute_set</p>

<p><b>Aliases</b>:</p>
<ul>
	<li>product_attribute_set</li>
</ul>


<p><b>Methods</b>:</p>
<ul>
	<li><a href="product_attribute_set.list.html" title="product_attribute_set.list">product_attribute_set.list</a><font color="#000000">&nbsp;&#45; Retrieve the list of product attribute sets</font></li>
	<li><font color="#000000"><a href="product_attribute_set.attributeAdd.html" title="product_attribute_set.attributeAdd">product_attribute_set.attributeAdd</a></font> <font color="#000000">&#45; Add an attribute to the attribute set</font></li>
	<li><font color="#000000"><a href="product_attribute_set.attributeRemove.html" title="product_attribute_set.attributeRemove">product_attribute_set.attributeRemove</a></font> <font color="#000000">&#45; Remove an attribute from an attribute set</font></li>
	<li><a href="product_attribute_set.create.html" title="product_attribute_set.create">product_attribute_set.create</a> &#45; Create a new attribute set</li>
	<li><a href="product_attribute_set.groupAdd.html" title="product_attribute_set.groupAdd">product_attribute_set.groupAdd</a> &#45; Add a new group for attributes in the attribute set</li>
	<li><a href="product_attribute_set.groupRemove.html" title="product_attribute_set.groupRemove">product_attribute_set.groupRemove</a> &#45; Remove a group of attributes from an attribute set</li>
	<li><a href="product_attribute_set.groupRename.html" title="product_attribute_set.groupRename">product_attribute_set.groupRename</a> &#45; Rename a group of attributes in an attribute set</li>
	<li><a href="product_attribute_set.remove.html" title="product_attribute_set.remove">product_attribute_set.remove</a> &#45; Remove an attribute set</li>
</ul>


<h5><a name="MAPI-ProductAttributeSets-Faults%3A"></a>Faults:</h5>


<table><tbody>
<tr>
<th> Fault Code </th>
<th> Fault Message </th>
</tr>
<tr>
<td> 100 </td>
<td> Attribute set with requested id does not exist. </td>
</tr>
<tr>
<td> 101 </td>
<td> Invalid data given. </td>
</tr>
<tr>
<td> 102 </td>
<td> Error while creating attribute set. Details in error message. </td>
</tr>
<tr>
<td> 103 </td>
<td> Error while removing attribute set. Details in error message. </td>
</tr>
<tr>
<td> 104 </td>
<td> Attribute set with requested id does not exist. </td>
</tr>
<tr>
<td> 105 </td>
<td> Unable to remove attribute set as it has related goods. Use forceProductsRemove parameter to remove attribute set with all goods. </td>
</tr>
<tr>
<td> 106 </td>
<td> Attribute with requested id does not exist. </td>
</tr>
<tr>
<td> 107 </td>
<td> Error while adding attribute to attribute set. Details in error message. </td>
</tr>
<tr>
<td> 108 </td>
<td> Attribute group with requested id does not exist. </td>
</tr>
<tr>
<td> 109 </td>
<td> Requested attribute is already in requested attribute set. </td>
</tr>
<tr>
<td> 110 </td>
<td> Error while removing attribute from attribute set. Details in error message. </td>
</tr>
<tr>
<td> 111 </td>
<td> Requested attribute is not in requested attribute set. </td>
</tr>
<tr>
<td> 112 </td>
<td> Requested group exist already in requested attribute set. </td>
</tr>
<tr>
<td> 113 </td>
<td> Error while adding group to attribute set. Details in error message. </td>
</tr>
<tr>
<td> 114 </td>
<td> Error while renaming group. Details in error message. </td>
</tr>
<tr>
<td> 115 </td>
<td> Error while removing group from attribute set. Details in error message. </td>
</tr>
<tr>
<td> 116 </td>
<td> Group can not be removed as it contains system attributes. </td>
</tr>
<tr>
<td> 117 </td>
<td> Group can not be removed as it contains attributes, used in configurable products. </td>
</tr>
</tbody></table>


<h5><a name="MAPI-ProductAttributeSets-Example%3A"></a>Example:</h5>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy-&gt;login('apiUser', 'apiKey');

echo "&lt;pre&gt;";
// create new set
$setName = "New Test Set";
$skeletonId = 4;

$setId = $proxy-&gt;call(
    $sessionId,
    "product_attribute_set.create",
    array(
         $setName,
         $skeletonId
    )
);

// Get list
$setList = $proxy-&gt;call(
    $sessionId,
    "product_attribute_set.list"
);
echo "Set list:\n";
print_r($setList);

// create group
$groupName = "Test Group";
$groupId = $proxy-&gt;call(
    $sessionId,
    "product_attribute_set.groupAdd",
    array(
         $setId,
         $groupName
    )
);

// rename group
$newGroupName = "New Test Group";
$result = $proxy-&gt;call(
    $sessionId,
    "product_attribute_set.groupRename",
    array(
         $groupId,
         $newGroupName
    )
);

// add attribute
$attributeId = 83;
$result = $proxy-&gt;call(
    $sessionId,
    "product_attribute_set.attributeAdd",
    array(
         $attributeId,
         $setId
    )
);

//remove attribute
$result = $proxy-&gt;call(
    $sessionId,
    "product_attribute_set.attributeRemove",
    array(
         $attributeId,
         $setId
    )
);

// remove group
$result = $proxy-&gt;call(
    $sessionId,
    "product_attribute_set.groupRemove",
    array(
         $groupId
    )
);

// remove set
$result = $proxy-&gt;call(
    $sessionId,
    "product_attribute_set.remove",
    array(
         $setId
    )
);</pre>
		</div>
</div></div>

				    
Create the Magento文件系统所有者                   			    
